﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace vHCS.K2App.MdlK2.OT
{
    public partial class OTApprove : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            String currurl = HttpContext.Current.Request.RawUrl;
            String sn = (Request.QueryString["SN"] != null ? Request.QueryString["SN"].ToString() : "");
            String shareUser = (Request.QueryString["SharedUser"] != null ? Request.QueryString["SharedUser"].ToString() : "");

            if (!string.IsNullOrEmpty(sn))
            {
                string version = K2CoreLib.K2Utils.GetDataField(sn, "Version", shareUser);
                Response.Redirect(version + "/TS_ApproveOT.aspx?" + K2CoreLib.K2Utils.GetParaUrl(currurl));
            }
        }
    }
}